//
//  ZLComposeTypeButton.swift
//  ZLWeibo
//
//  Created by zhanglongtao on 17/1/4.
//  Copyright © 2017年 hanju001. All rights reserved.
//

import UIKit

//UIControl 内置touchUpInside相应
class ZLComposeTypeButton: UIControl {

    
    @IBOutlet weak var imageView: UIImageView!
    
    @IBOutlet weak var titleLabel: UILabel!
    

    //要展现的控制器的类名
    var clsName: String?
    
    class func composeTypeButton(imageName: String, title: String) -> ZLComposeTypeButton {
        
        let nib = UINib(nibName: "ZLComposeTypeButton", bundle: nil)
        
        let btn = nib.instantiate(withOwner: nil, options: nil)[0] as! ZLComposeTypeButton
        
        btn.imageView.image = UIImage(named: imageName)
        btn.titleLabel.text = title
        
        return btn
    }
    
}
